package com.bruan.d1_collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest4 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("得瑟得瑟1");
        c.add("得瑟得瑟2");
        c.add("得瑟得瑟3");
        c.add("得瑟得瑟4");
        c.add("得瑟得瑟5");
        c.add("得瑟得瑟6");
        System.out.println(c);
        for(String ele : c){
            System.out.println(ele);
        }

        String[] names = {"dsds","dwdw","dwdwd"};
        for (String s:names){
            System.out.println(s);
        }
        for (String name : names) {
            System.out.println(name);
        }

    }
}
